import java.util.ArrayList;

import oldmodifiers.Modifier;
import oldmodifiers.Modifiers;

import inputs.Color;
import inputs.Input;
import outputAdapters.OutputRanges;
import outputAdapters.ScaleAdapter;
import processing.core.PFont;
import codeanticode.gsvideo.GSCapture;


public class ModTest {
	public static void main(String args[]){
		GSCapture cam; // Capture object
		int vidX = 640, vidY = 480; // Size of the applet window and capture
		int redVal, greenVal, blueVal; // Variables to hold the value of each color
		int colorVal, totalVal, adaptedVal; // Hold the total color value
		PFont font; // Font to write on the screen with
		Color redColor;
		Color blueColor;
		Modifier rbMod;
		ScaleAdapter outputAdapter;

		redColor = new Color(0);
		blueColor = new Color(0);
		ArrayList<Input> rbList = new ArrayList<Input>(2);
		rbList.add(redColor);
		rbList.add(blueColor);
		rbMod = new Modifier(rbList, Modifiers.Average);
		rbMod.setRun(true);

		outputAdapter = new ScaleAdapter(OutputRanges.Pitch, rbMod);

		redVal = 120;
		greenVal = 150;
		blueVal = 180;
		totalVal = (redVal + greenVal + blueVal) / 3;		

		redColor.setValue(redVal);
		blueColor.setValue(blueVal);


		while (1 == 1)
		{
			rbMod.UpdateInput();

			outputAdapter.UpdateInput();

			totalVal = rbMod.getValue();

			adaptedVal = outputAdapter.getValue();
		}
	}
}
